Optimal. Leaf size=15 \[ \frac{\cos (x)}{1-\sin (x)}-x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0604004, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {4391, 2735, 2648} \[ \frac{\cos (x)}{1-\sin (x)}-x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4391
Rule 2735
Rule 2648
Rubi steps
\begin{align*} \int \frac{\tan (x)}{\sec (x)-\tan (x)} \, dx &=\int \frac{\sin (x)}{1-\sin (x)} \, dx\\ &=-x+\int \frac{1}{1-\sin (x)} \, dx\\ &=-x+\frac{\cos (x)}{1-\sin (x)}\\ \end{align*}
Mathematica [A] time = 0.0360226, size = 29, normalized size = 1.93 \[ \frac{2 \sin \left (\frac{x}{2}\right )}{\cos \left (\frac{x}{2}\right )-\sin \left (\frac{x}{2}\right )}-x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.067, size = 15, normalized size = 1. \begin{align*} -2\, \left ( \tan \left ( x/2 \right ) -1 \right ) ^{-1}-x \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.49618, size = 38, normalized size = 2.53 \begin{align*} -\frac{2}{\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1} - 1} - 2 \, \arctan \left (\frac{\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.468083, size = 89, normalized size = 5.93 \begin{align*} -\frac{{\left (x - 1\right )} \cos \left (x\right ) -{\left (x + 1\right )} \sin \left (x\right ) + x - 1}{\cos \left (x\right ) - \sin \left (x\right ) + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\tan{\left (x \right )}}{- \tan{\left (x \right )} + \sec{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.14186, size = 19, normalized size = 1.27 \begin{align*} -x - \frac{2}{\tan \left (\frac{1}{2} \, x\right ) - 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]